﻿

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;


public class BLL_tbl_sicomill
{
    public BLL_tbl_sicomill()
    {

    }

    public List<tbl_sicomill> select(int ID)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.select(ID);
    }

    public List<tbl_sicomill> selectAll()
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.selectAll();
    }

    public bool insert(tbl_sicomill tbl)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        int i = 0;
        i = dal.insert(
            tbl.PO_Number
, tbl.Work_Order_Number
, tbl.Total_Input_RM_Si
, tbl.Mill_Selection
, tbl.Rotor_RPM
, tbl.Gas_Pressure
, tbl.Feed_rate
, tbl.Total_Output_Product
, tbl.Date
, tbl.CREATED_BY
, tbl.CREATED_DATE
, tbl.sicomill_inputvessels
, tbl.sicomill_outputvessels
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_sicomill tbl)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        int i = 0;
        i = dal.update(
            tbl.ID
, tbl.PO_Number
, tbl.Work_Order_Number
, tbl.Total_Input_RM_Si
, tbl.Mill_Selection
, tbl.Rotor_RPM
, tbl.Gas_Pressure
, tbl.Feed_rate
, tbl.Total_Output_Product
, tbl.Date
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
, tbl.sicomill_inputvessels
, tbl.sicomill_outputvessels
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_sicomill tbl)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        int i = 0;
        i = dal.delete(
                tbl.ID
        );

        return Convert.ToBoolean(i);
    }


    public DataTable getDateByPO_Number(string PO_Number)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.getDateByPO_Number(PO_Number);
    }


    public int countSicomill_Inputvessels(int sicoMill_ID)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.countSicomill_Inputvessels(sicoMill_ID);
    }

    public int countSicomill_Outputvessels(int sicoMill_ID)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.countSicomill_Outputvessels(sicoMill_ID);
    }

    public DataTable getDataSicomill_Inputvessels(int sicoMill_ID)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.getDataSicomill_Inputvessels(sicoMill_ID);
    }

    public DataTable getDataSicomill_Outputvessels(int sicoMill_ID)
    {
        DAL_tbl_sicomill dal = new DAL_tbl_sicomill();
        return dal.getDataSicomill_Outputvessels(sicoMill_ID);
    }
}

